home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_02_07 / 2n07017a < prev    next >
Text File  |  1991-06-02  |  595b  |  37 lines

  1. #include <windows.h>
  2. #include <stdlib.h>
  3. #include <stdio.h>
  4.  
  5. #include "timer.h"
  6.  
  7. int TIMER::OutOfTimers() { return TRUE; }
  8.  
  9. #include "common.c"
  10.  
  11. void    TIMER::InitTimerPackage(HANDLE Instance)
  12.     {
  13.     TD.CallBack = MakeProcInstance(
  14.         (FARPROC)&TimerCallBack, Instance);
  15.     }
  16.  
  17. TIMER::TIMER(int EventId)
  18.     {
  19.     InitTimer(this, EventId);
  20.     }
  21.  
  22. TIMER::~TIMER()
  23.     {
  24.     DeleteTimer(this);
  25.     }
  26.  
  27. int     TIMER::Start(ULONG Interval)
  28.     {
  29.     return SetInterval(this, Interval);
  30.     }
  31.  
  32. void    TIMER::Stop()
  33.     {
  34.     SetInterval(this, 0);
  35.     }
  36.  
  37.